package at.tuwien.seminar.scrum1.view.wicket.customer;

import at.tuwien.seminar.scrum1.model.Customer;
import at.tuwien.seminar.scrum1.view.customer.update.UpdateCustomer;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;

public class CustomerUpdateActionPanel extends Panel
    {
        /**
         * @param id
         *            component id
         * @param model
         *            model for contact
         */
        public CustomerUpdateActionPanel(String id, final IModel<Customer> model)
        {
            super(id, model);
            add(new Link("select")
            {
                @Override
                public void onClick()
                {
                     setResponsePage(new UpdateCustomer(model.getObject()));
                }
            });
        }
    }